home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / gdb-4.12 / gdb / gdbserve / makefile.in < prev    next >
Encoding:
Makefile  |  1994-02-03  |  10.1 KB  |  303 lines

  1. #Copyright 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  2.  
  3. # This file is part of GDB.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. prefix = /usr/local
  18.  
  19. program_transform_name =
  20. exec_prefix = $(prefix)
  21. bindir = $(exec_prefix)/bin
  22. libdir = $(exec_prefix)/lib
  23. tooldir = $(libdir)/$(target_alias)
  24.  
  25. datadir = $(prefix)/lib
  26. mandir = $(prefix)/man
  27. man1dir = $(mandir)/man1
  28. man2dir = $(mandir)/man2
  29. man3dir = $(mandir)/man3
  30. man4dir = $(mandir)/man4
  31. man5dir = $(mandir)/man5
  32. man6dir = $(mandir)/man6
  33. man7dir = $(mandir)/man7
  34. man8dir = $(mandir)/man8
  35. man9dir = $(mandir)/man9
  36. infodir = $(prefix)/info
  37. includedir = $(prefix)/include
  38. docdir = $(datadir)/doc
  39.  
  40. SHELL = /bin/sh
  41.  
  42. INSTALL = `cd $(srcdir)/../..;pwd`/install.sh -c
  43. INSTALL_PROGRAM = $(INSTALL)
  44. INSTALL_DATA = $(INSTALL)
  45. INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
  46. INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
  47.  
  48. AR = ar
  49. AR_FLAGS = qv
  50. RANLIB = ranlib
  51.  
  52. # Flags that describe where you can find the termcap library.
  53. # This can be overridden in the host Makefile fragment file.
  54. TERMCAP = -ltermcap
  55.  
  56. # System V: If you compile gdb with a compiler which uses the coff
  57. # encapsulation feature (this is a function of the compiler used, NOT
  58. # of the m-?.h file selected by config.gdb), you must make sure that
  59. # the GNU nm is the one that is used by munch.
  60.  
  61. # If you are compiling with GCC, make sure that either 1) You use the
  62. # -traditional flag, or 2) You have the fixed include files where GCC
  63. # can reach them.  Otherwise the ioctl calls in inflow.c
  64. # will be incorrectly compiled.  The "fixincludes" script in the gcc
  65. # distribution will fix your include files up.
  66. #CC=cc
  67. #CC=gcc -traditional
  68. GCC=gcc
  69.  
  70. # Directory containing source files.  Don't clean up the spacing,
  71. # this exact string is matched for by the "configure" script.
  72. srcdir = .
  73.  
  74. # It is also possible that you will need to add -I/usr/include/sys to the
  75. # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which 
  76. # is where it should be according to Posix).
  77.  
  78. # If you use bison instead of yacc, it needs to include the "-y" argument.
  79. #BISON=bison -y
  80. BISON=yacc
  81. YACC=$(BISON)
  82.  
  83. # where to find texinfo; GDB dist should include a recent one
  84. TEXIDIR=${srcdir}/../texinfo
  85.  
  86. # where to find makeinfo, preferably one designed for texinfo-2
  87. MAKEINFO=makeinfo
  88.  
  89. # Set this up with gcc if you have gnu ld and the loader will print out
  90. # line numbers for undefinded refs.
  91. #CC-LD=gcc -static
  92. CC-LD=${CC}
  93.  
  94. # Where is the "include" directory?  Traditionally ../include or ./include
  95. INCLUDE_DIR =  ${srcdir}/../../include
  96. INCLUDE_DEP = $$(INCLUDE_DIR)
  97.  
  98. # Where is the source dir for the MMALLOC library? Traditionally ../mmalloc
  99. # or ./mmalloc  (When we want the binary library built from it, we use
  100. # ${MMALLOC_DIR}${subdir}.)
  101. # Note that mmalloc can still be used on systems without mmap().
  102. # To use your system malloc, comment out the following defines.
  103. MMALLOC_DIR = ${srcdir}/../mmalloc
  104. MMALLOC_DEP = $$(MMALLOC_DIR)
  105. # To use your system malloc, uncomment MMALLOC_DISABLE.
  106. #MMALLOC_DISABLE = -DNO_MMALLOC
  107. # To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
  108. #MMALLOC_CHECK = -DNO_MMALLOC_CHECK
  109. MMALLOC_CFLAGS = ${MMALLOC_CHECK} ${MMALLOC_DISABLE}
  110.  
  111. # Where is the source dir for the READLINE library?  Traditionally in .. or .
  112. # (For the binary library built from it, we use ${READLINE_DIR}${subdir}.)
  113. READLINE_DIR = ${srcdir}/../readline
  114. READLINE_DEP = $$(READLINE_DIR)
  115.  
  116. # All the includes used for CFLAGS and for lint.
  117. # -I. for config files.
  118. # -I${srcdir} possibly for regex.h also.
  119. # -I${srcdir}/config for more generic config files.
  120. INCLUDE_CFLAGS = -I. -I${srcdir} -I${srcdir}/.. -I${srcdir}/../config -I$(INCLUDE_DIR)
  121.  
  122. # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
  123. # from the config/ directory.
  124. GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
  125. #PROFILE_CFLAGS = -pg
  126.  
  127. # CFLAGS is specifically reserved for setting from the command line
  128. # when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
  129. CFLAGS = -g
  130. # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
  131. INTERNAL_CFLAGS = ${CFLAGS} ${GLOBAL_CFLAGS} ${PROFILE_CFLAGS} ${MMALLOC_CFLAGS} ${INCLUDE_CFLAGS} ${USER_CFLAGS}
  132. LDFLAGS = $(CFLAGS)
  133.  
  134. # Perhaps should come from parent Makefile
  135. VERSION = gdbserver-4.9.1
  136. DIST=gdb
  137.  
  138. LINT=/usr/5bin/lint
  139. LINTFLAGS= -I${BFD_DIR}
  140.  
  141. # Host and target-dependent makefile fragments come in here.
  142. ####
  143. # End of host and target-dependent makefile fragments
  144.  
  145. # All source files that go into linking GDB remote server.
  146.  
  147. SFILES = $(srcdir)/low-lynx.c $(srcdir)/low-sparc.c $(srcdir)/low-sun3.c \
  148.      $(srcdir)/utils.c $(srcdir)/server.c $(srcdir)/remote-utils.c
  149.  
  150. DEPFILES = $(GDBSERVER_DEPFILES)
  151.  
  152. SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES)
  153. TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} 
  154.  
  155. OBS = utils.o $(GDBSERVER_DEPFILES) server.o remote-utils.o
  156.  
  157. # Prevent Sun make from putting in the machine type.  Setting
  158. # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
  159. .c.o:
  160.     ${CC} -c ${INTERNAL_CFLAGS} $<
  161.  
  162. all: gdbserver
  163.  
  164. # Traditionally "install" depends on "all".  But it may be useful
  165. # not to; for example, if the user has made some trivial change to a 
  166. # source file and doesn't care about rebuilding or just wants to save the
  167. # time it takes for make to check that all is up to date.
  168. # install-only is intended to address that need.
  169. install: all install-only
  170. install-only: 
  171.     $(INSTALL_XFORM) gdbserver $(bindir)/gdbserver
  172.     $(INSTALL_XFORM1) $(srcdir)/gdbserver.1 $(man1dir)/gdbserver.1
  173. #    @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
  174.  
  175. uninstall: force
  176.     rm -f $(bindir)/gdbserver $(man1dir)/gdbserver.1
  177. #    @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
  178.  
  179. installcheck:
  180. check:
  181. info dvi:
  182. install-info:
  183. clean-info:
  184.  
  185. gdbserver: $(OBS) ${ADD_DEPS} ${CDEPS}
  186.     ${CC-LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o gdbserver $(OBS) \
  187.       $(GDBSERVER_LIBS)
  188.  
  189. config.status:
  190.     @echo "You must configure gdbserver.  Look at the README file for details."
  191.     @false
  192.  
  193. # Put the proper machine-specific files first, so M-. on a machine
  194. # specific routine gets the one for the correct machine.
  195. # The xyzzy stuff below deals with empty DEPFILES
  196. TAGS:    ${TAGFILES}
  197.     etags `find ${srcdir}/../config -name $(TM_FILE) -print` \
  198.       `find ${srcdir}/../config -name ${XM_FILE} -print` \
  199.       `find ${srcdir}/../config -name ${NAT_FILE} -print` \
  200.       `for i in yzzy ${DEPFILES}; do \
  201.          if [ x$$i != xyzzy ]; then \
  202.            echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \
  203.          fi; \
  204.        done` \
  205.       ${TAGFILES}
  206. tags: TAGS
  207.  
  208. # Making distributions of GDB and friends.
  209.  
  210. # Make a tar file containing the GDB directory of the distribution.
  211. gdb.tar.Z: force_update
  212.     $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
  213.     $(MAKE) $(MFLAGS) -f Makefile.in gdb-$(VERSION).tar.Z
  214.  
  215. # Make a directory `proto-gdb.dir' that contains an image of the GDB
  216. # directory of the distribution, built up with symlinks.  Note that this
  217. # make target is not directly referenced by any other rules in this makefile,
  218. # it is referenced by the makefile in the parent directory.
  219. make-proto-gdb.dir: force_update 
  220.     $(MAKE) $(MFLAGS) -f Makefile.in setup-to-dist
  221.     $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
  222.  
  223. # Set up the GDB source directory for distribution, by building all files that
  224. # are products of other files.
  225. setup-to-dist: update-depend force_update
  226.     ../configure none
  227.     (cd doc; $(MAKE) $(MFLAGS) GDBvn.texi)
  228.     $(MAKE) $(MFLAGS) gdb.info
  229.     $(MAKE) $(MFLAGS) refcard.ps
  230.  
  231. # Update the "depend" and "alldeps.mak" files in a source directory.
  232. # We update alldeps.mak first, since it is used to generate the list
  233. # of files to be checked for dependencies.
  234. update-depend: update-alldeps force_update
  235.     ../configure none -norecursion
  236.     rm -f depend
  237.     $(MAKE) $(MFLAGS) depend
  238.  
  239. # Update the "alldeps.mak" file in a source directory.
  240. update-alldeps: force_update
  241.     ../configure none -norecursion
  242.     rm -f alldeps.mak
  243.     $(MAKE) $(MFLAGS) alldeps.mak
  244.  
  245. # Build a tar file from a proto-gdb.dir.
  246. gdb-$(VERSION).tar.Z: force_update
  247.     rm -f gdb.tar gdb-$(VERSION).tar.Z
  248.     $(MAKE) $(MFLAGS) -f Makefile make-proto-gdb-1
  249.     ln -s proto-gdb.dir $(DIST)
  250.     tar chf - $(DIST) | compress >gdb-$(VERSION).tar.Z
  251.     rm -rf $(DIST) proto-gdb.dir
  252.  
  253. clean:
  254.     rm -f *.o ${ADD_FILES} *~
  255.     rm -f init.c version.c
  256.     rm -f gdbserver core make.log
  257.  
  258. distclean: clean c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
  259.     rm -f tm.h xm.h config.status
  260.     rm -f Makefile
  261.  
  262. realclean: clean
  263.     rm -f c-exp.tab.c m2-exp.tab.c ch-exp.tab.c TAGS
  264.     rm -f tm.h xm.h config.status
  265.     rm -f Makefile
  266.  
  267. STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
  268.  
  269. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  270.     $(SHELL) ./config.status
  271.  
  272. force:
  273.  
  274. version.c: Makefile
  275.     echo 'char *version = "$(VERSION)";' >version.c
  276.  
  277. # GNU Make has an annoying habit of putting *all* the Makefile variables
  278. # into the environment, unless you include this target as a circumvention.
  279. # Rumor is that this will be fixed (and this target can be removed)
  280. # in GNU Make 4.0.
  281. .NOEXPORT:
  282.  
  283. # GNU Make 3.63 has a different problem: it keeps tacking command line
  284. # overrides onto the definition of $(MAKE).  This variable setting
  285. # will remove them.
  286. MAKEOVERRIDES=
  287.  
  288. ## This is ugly, but I don't want GNU make to put these variables in
  289. ## the environment.  Older makes will see this as a set of targets
  290. ## with no dependencies and no actions.
  291. unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
  292.  
  293. server.o : ${srcdir}/server.c ${srcdir}/server.h
  294. remote-utils.o : ${srcdir}/remote-utils.c ${srcdir}/server.h
  295. low-lynx.o : ${srcdir}/low-lynx.c ${srcdir}/server.h
  296. low-sparc.o : $(srcdir)/low-sparc.c $(srcdir)/server.h
  297. low-sun3.o : $(srcdir)/low-sun3.c $(srcdir)/server.h
  298. utils.o : ${srcdir}/utils.c ${srcdir}/server.h
  299.  
  300. # This is the end of "Makefile.in".
  301.